#include <stdlib.h>

GtkWidget *_mood;
GtkWidget *_weather;
GtkWidget *_mainTextView;
GtkWidget *_textBox; //this and the one above it are the same
                     //use the one above, :DEPRECATED
GtkWidget *_subject;


char *edit_gui_al_title(char *title);
//Sets the subject, returns it if NULL

char *edit_gui_al_text(char *txt);
//Sets or returns current main text.

void edit_gui_al_removeChar(int loc);
//Pre:
//Post:  Removes character at loc.

void edit_gui_al_insertChar(int loc, unsigned int character);
//Pre: character is 4 chars, and is null terminated
//Post:  inserts character at loc.
void edit_gui_al_removeStr(int loc, int len);
//Pre:
//Post: removes section starting at loc and ending at len
void edit_gui_al_insertStr(int loc, char *str);
//Pre:
//Post:  inserts str at loc.

char *edit_gui_al_creationDate(char *date);
//Sets or returns creationDate.

int edit_gui_al_cursor(int);

char *edit_gui_al_getSelectedText();
//Pre:  Main window is initialized
//Post:  Returns the highlighted text or all text.


int edit_gui_al_textLink(int start, int end, char *lnk);
//Pre:  int start and end are within the text, and lnk is a valid c stringMatc
//Post:  Main text is given the link and made visible.

void edit_gui_al_clearLinks();
//Pre:
//Post:  All links on the text box are removed.

void edit_gui_al_removeLink(const char *name);
//Pre:  Name exists
//Post:  Is removed and destroyed from the interface.

void edit_gui_al_markText(const char *text, const char *start, const char *end);
//Marks text for search

void edit_gui_al_clearTextMarks();
//Clears marked made with above function

void edit_gui_al_setVisible(int yn);
//Set to 0 for invisible and 1 for visible.  
//This is for the highlight function to make it much faster.

void edit_gui_al_jump_to(int pos);
//Pre:
//Post:  Jumps the main text box to iter at pos inside its' text.


int edit_gui_al_mood(int mood);
//Sets or returns current displayed mood, -1 to return

int edit_gui_al_weather(int weather);
//Sets or returns current weather.


void edit_gui_al_setImage(int mood, int weather);
//Pre:  Mood and weather must exists
//Post:  Opens the corresponding files, mixes them, and sets to the 
//		side image.


char *edit_gui_al_lastEdit(const char *date);
//Sets the date widget, or if passed null returns the value in the
//date widget.
